<template>
  <div>
    <div>Jerry: {{ count }}</div>
    <button @click="addTom"> + 3</button>
    <div>{{ $store.getters.showJerryCount }}</div>
  </div>
</template>

<script>
export default {
  data() {
    return {
    }
  },
  computed: {
    count() {
      return this.$store.state.jerryCount
    }
  },
  methods: {
    addTom() {
      // this.$store.commit('addTom', 3)
      this.$store.dispatch('addTomAsync', 4)
    }
  }
}
</script>

<style>

</style>
